/*
 * @Author: Lin Hongwei
 * @Date: 2022-10-25 22:14:19
 * @LastEditTime: 2022-10-30 23:16:47
 * @LastEditors: Lin Hongwei
 * @email: 1365755396@qq.com
 * @CSDN: https://blog.csdn.net/weixin_45429409
 * @Description: 项目模块中间件
 */

/**
 * @description: 项目表单校验
 */
const projectValidatorMiddleware = (ctx,next)=>{
  const {name,group,personId} = ctx.request.body;
  if(!name||!group||!personId)return ctx.fail("项目名称，项目组名，负责人不能为空！");
  return next();
}

module.exports = {
  projectValidatorMiddleware
}